//
//  BSAddFamilyCollectionViewCell.m
//  SuoSiApp
//
//  Created by zhang on 16/4/13.
//  Copyright © 2016年 Ym. All rights reserved.
//

#import "BSAddFamilyCollectionViewCell.h"

@implementation BSAddFamilyCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
 
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview];
    }
    return self;
}
- (void)addSubview{

////    
//    self.imageBT = BSButton;
//    _imageBT.frame = CGRectMake(self.width / 4, kMartin10, self.width/2, self.height/2 - kMartin10);
//    [_imageBT setBackgroundImage:[UIImage imageNamed:@"sz_addple_icon.png"] forState:(UIControlStateNormal)];
//    [self.contentView addSubview:_imageBT];
//    头像
    self.iconImageView = [[UIImageView alloc]initWithFrame:CGRectMake(self.width / 4, kMartin10, self.width/2, self.height/2 - kMartin10)];
    self.iconImageView.image = [UIImage imageNamed:@"sz_addple_icon.png"];
    [self.contentView addSubview:_iconImageView];
//    姓名
    self.nameLB = [[UILabel alloc]initWithFrame:CGRectMake(0, self.iconImageView.bottom + kMartin10, self.width, self.iconImageView.height /2)];
    _nameLB.font = [UIFont systemFontOfSize:20];
    self.nameLB.text = @"小小明";
    self.nameLB.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_nameLB];
    
//    电话
    self.phoneLB = [[UILabel alloc]initWithFrame:CGRectMake(0, self.nameLB.bottom + kMartin5, (self.width), kMartin15)];
    self.phoneLB.textAlignment = NSTextAlignmentCenter;
    self.phoneLB.text = @"1232131232";
    self.phoneLB.textAlignment = NSTextAlignmentCenter;
    self.phoneLB.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:_phoneLB];
    
//    删除按钮
    self.deleteBT = BSButton;
    self.deleteBT.frame = CGRectMake(self.iconImageView.right - kMartin15, kMartin10, kMartin30, kMartin30);
    [self.deleteBT setBackgroundImage:[UIImage imageNamed:@"sz_deletFmy_03.png"] forState:(UIControlStateNormal)];
    self.deleteBT.hidden = YES;
    self.deleteBT.layer.cornerRadius = kMartin15;
    [self.contentView addSubview:_deleteBT];
    

}

- (void)setModel:(BSUIFamily *)model{

    _model = model;
    self.nameLB.text = model.Name;
    self.phoneLB.text = model.LoginName;

}



@end
